/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package nl.hanze.web.banken;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Herman
 */
@Entity
@Table(name = "TRANSACTIE")
@NamedQueries({
    @NamedQuery(name = "DerbyTransactie.findAll", query = "SELECT d FROM DerbyTransactie d")})
public class DerbyTransactie implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID")
    private Integer id;
    @Basic(optional = false)
    @NotNull
    @Column(name = "VERZENDER")
    private int verzender;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ONTVANGER")
    private int ontvanger;
    @Basic(optional = false)
    @NotNull
    @Column(name = "BEDRAG")
    private int bedrag;
    @Basic(optional = false)
    @NotNull
    @Column(name = "DATUM")
    @Temporal(TemporalType.DATE)
    private Date datum;

    public DerbyTransactie() {
    }

    public DerbyTransactie(Integer id) {
        this.id = id;
    }

    public DerbyTransactie(Integer id, int verzender, int ontvanger, int bedrag, Date datum) {
        this.id = id;
        this.verzender = verzender;
        this.ontvanger = ontvanger;
        this.bedrag = bedrag;
        this.datum = datum;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public int getVerzender() {
        return verzender;
    }

    public void setVerzender(int verzender) {
        this.verzender = verzender;
    }

    public int getOntvanger() {
        return ontvanger;
    }

    public void setOntvanger(int ontvanger) {
        this.ontvanger = ontvanger;
    }

    public int getBedrag() {
        return bedrag;
    }

    public void setBedrag(int bedrag) {
        this.bedrag = bedrag;
    }

    public Date getDatum() {
        return datum;
    }

    public void setDatum(Date datum) {
        this.datum = datum;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DerbyTransactie)) {
            return false;
        }
        DerbyTransactie other = (DerbyTransactie) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "nl.hanze.web.banken.DerbyTransactie[ id=" + id + " ]";
    }
    
}
